package cn.wolfcode.mongo.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Document("travel_comment")
public class TravelComment {
    @Id
    private String id;

    private Long travelId;
    private String travelTitle;

    private Long userId;
    private String nickname;
    private String city;
    private int level;
    private String headImgUrl;

    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date createTime;
    private String content;

    private int type = 0;  //0 普通评论；  1 评论的评论

    //要评论的评论的信息
    private TravelComment refComment;


}